package com.ruoyi.goods.service.impl;


import com.ruoyi.goods.domain.BmSpecification;
import com.ruoyi.goods.mapper.BmSpecificationMapper;
import com.ruoyi.goods.service.IBmSpecificationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 商品规格信息Service业务层处理
 *
 * @author ruoyi
 * @date 2023-08-09
 */
@Service
public class BmSpecificationServiceImpl implements IBmSpecificationService
{
    @Autowired
    private BmSpecificationMapper bmSpecificationMapper;

    /**
     * 查询商品规格信息
     *
     * @param id 商品规格信息主键
     * @return 商品规格信息
     */
    @Override
    public BmSpecification selectBmSpecificationById(Long id)
    {
        return bmSpecificationMapper.selectBmSpecificationById(id);
    }

    /**
     * 查询商品规格信息列表
     *
     * @param bmSpecification 商品规格信息
     * @return 商品规格信息
     */
    @Override
    public List<BmSpecification> selectBmSpecificationList(BmSpecification bmSpecification)
    {
        return bmSpecificationMapper.selectBmSpecificationList(bmSpecification);
    }

    /**
     * 新增商品规格信息
     *
     * @param bmSpecification 商品规格信息
     * @return 结果
     */
    @Override
    public int insertBmSpecification(BmSpecification bmSpecification)
    {
        return bmSpecificationMapper.insertBmSpecification(bmSpecification);
    }

    /**
     * 修改商品规格信息
     *
     * @param bmSpecification 商品规格信息
     * @return 结果
     */
    @Override
    public int updateBmSpecification(BmSpecification bmSpecification)
    {
        return bmSpecificationMapper.updateBmSpecification(bmSpecification);
    }

    /**
     * 批量删除商品规格信息
     *
     * @param ids 需要删除的商品规格信息主键
     * @return 结果
     */
    @Override
    public int deleteBmSpecificationByIds(Long[] ids)
    {
        return bmSpecificationMapper.deleteBmSpecificationByIds(ids);
    }

    /**
     * 删除商品规格信息信息
     *
     * @param id 商品规格信息主键
     * @return 结果
     */
    @Override
    public int deleteBmSpecificationById(Long id)
    {
        return bmSpecificationMapper.deleteBmSpecificationById(id);
    }
}
